package com.liqi.items.mapper;

import com.liqi.items.domain.TRelFormSubject;
import com.liqi.items.domain.TRelServiceSubject;

import java.util.List;
import java.util.Map;

/**
 * 主题事项关联Mapper接口
 *
 * @author xiaoli
 * @date 2022-04-08
 */
public interface TRelServiceSubjectMapper
{
    /**
     * 查询主题事项关联
     *
     * @param id 主题事项关联主键
     * @return 主题事项关联
     */
    public TRelServiceSubject selectTRelServiceSubjectById(Long id);

    /**
     * 查询主题事项关联列表
     *
     * @param tRelServiceSubject 主题事项关联
     * @return 主题事项关联集合
     */
    public List<TRelServiceSubject> selectTRelServiceSubjectList(TRelServiceSubject tRelServiceSubject);

    /**
     * 新增主题事项关联
     *
     * @param tRelServiceSubject 主题事项关联
     * @return 结果
     */
    public int insertTRelServiceSubject(TRelServiceSubject tRelServiceSubject);
    
    /**
     * 新增主题表单关联
     *
     * @param tRelFormSubject 主题事项关联
     * @return 结果
     */
    public int insertTRelFormSubject(TRelFormSubject tRelFormSubject);

    /**
     * 修改主题事项关联
     *
     * @param tRelServiceSubject 主题事项关联
     * @return 结果
     */
    public int updateTRelServiceSubject(TRelServiceSubject tRelServiceSubject);

    /**
     * 删除主题事项关联
     *
     * @param id 主题事项关联主键
     * @return 结果
     */
    public int deleteTRelServiceSubjectById(Long id);

    /**
     * 批量删除主题事项关联
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteTRelServiceSubjectByIds(Long[] ids);

    /**
     * 通过主题代码 查询主题事项关联列表
     *
     * @param subjectCode 主题代码
     * @return 主题事项关联集合
     */
    public List<TRelServiceSubject> selectTRelServiceSubjectBySubjectCode(String subjectCode);

    /**
     * 查询主题事项关联
     *
     * @param tRelServiceSubject 主题关联事项实体
     * @return 主题事项关联
     */
    
    public TRelServiceSubject selectTRelServiceSubjectByServiceSubjectCode(TRelServiceSubject tRelServiceSubject);
    /**
     * 查询主题表单关联
     *
     * @param tRelServiceSubject 主题关联表单实体
     * @return 主题表单关联
     */
   
    public List<TRelFormSubject> selectTRelFormSubjectByServiceSubjectCode(String subjectCode);
    public List<TRelFormSubject> selectlistExcludeFormByServiceSubjectCode(Map<String,Object> resultmap);
    /**
     * 删除主题表单关联
     *
     * @param id 主题表单关联主键
     * @return 结果
     */
    public int deleteTRelFormSubjectById(Long[] ids);
    
    /**
     * 修改主题表单关联
     *
     * @param tRelServiceSubject 主题表单关联
     * @return 结果
     */
    public int updateTRelFormSubject(TRelFormSubject tRelFormSubject);
    
    /**
     * 删除主题的对应事项主题关联关系
     * @return
     */
//    public int deleteTRelServiceSubjectBySubjectCode(String serviceCode,List<String> subjectCode);
    public int deleteTRelServiceSubjectBySubjectCode(Map<String,Object> map);

    
    List<String> getFormKeyByIds(Long[] ids);

}
